import React, { Component } from 'react';
class LifeChild extends Component {
    state = {  } 
    componentWillReceiveProps(nextProps){
        console.log('props',this.props.count,nextProps.count);
        if(this.props.count!==nextProps.count){
            console.log('要自动结算');
        }
    }
    render() { 
        return (<>
            child:{this.props.count}
        </>);
    }
}
 
export default LifeChild;